package com.itheima.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.MenuDao;
import com.itheima.pojo.Menu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @PackageName: com.itheima.service
 * @ClassName: MenuServiceImpl
 * @Author: AdamMing
 * @Date: 2020/3/19 15:34
 * @Description: 菜单业务service实现类
 */
@Service(interfaceClass = MenuService.class)
@Transactional
public class MenuServiceImpl implements MenuService {

    @Autowired
    private MenuDao menuDao;

    @Override
    public List<Menu> findAll() {
        return menuDao.findAll();
    }

    @Override
    public List<Integer> findMenuIdsByRoleId(Integer roleId) {
        return menuDao.findMenuIdsByRoleId(roleId);
    }
}
